<blockquote class="layui-elem-quote">
  <div class="layui-inline">
    <i class="layui-icon layui-icon-list layui-head-icon"></i>
    <span class="layui-font-16 layui-font-green">门店信息</span>
  </div>
</blockquote>
<div class="layui-card">
  <div class="layui-card-body">
    <form class="layui-form">
      <input type="hidden" name="id" value="{$row.id}">
      <div class="layui-form-item">
        <label class="layui-form-label">店铺头像</label>
        <div class="layui-input-block">
          <img src="{notempty name='row.logo'} {$row.logo} {else/} /static/admin/img/upimg.png {/notempty}"
            class="layui-upimg layui-circle">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">营业执照</label>
        <div class="layui-input-block">
          <img
            src="{notempty name='row.business_license'} {$row.business_license} {else/} /static/admin/img/upimg.png {/notempty}"
            class="layui-upimg layui-circle">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">店铺背景图片</label>
        <div class="layui-input-block">
          {foreach $row.bg_imgs as $key=>$value}
          <img data-tips-image style="top: 0;left: 130px; width:126px;height:126px" src="{$value}"
            class="margin-right-5 text-top">
          {/foreach}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">店铺名称</label>
        <div class="layui-input-block">
          <input type="text" disabled value="{$row.shop_name}" class="layui-input">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">法人</label>
        <div class="layui-input-block">
          <input type="text" disabled value="{$row.legal_person}" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">
          <input type="text" disabled value="{$row.contact_phone}" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">详细地址</label>
        <div class="layui-input-block">
          <input type="text" disabled value="{$row.province}{$row.city}{$row.area}{$row.address}" class="layui-input">
        </div>
      </div>
      {if condition="($row.status eq 1)"}
      <div class="layui-form-item"> <label class="layui-form-label">审核：</label>
        <div class="layui-input-block">
          <input type="radio" name="status" value="2" title="通过" />
          <input type="radio" name="status" value="3" title="拒绝" />
        </div>
      </div>
      {/if}

      {if condition="($row.status eq 1)"}
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit lay-filter="formAdd">立即提交</button>
        </div>
      </div>
      {/if}
    </form>
  </div>
</div>


<script>
  //Demo
  layui.use(['form', 'upload'], function () {
    var $ = layui.jquery, form = layui.form, upload = layui.upload;

    $('#store-user-grade-id').val('{$row.user_grade_id}');

    form.render('select');

    form.on('submit(formAdd)', function (data) {
      $.post('/store/shops.stores/update', data.field, function (res) {
        if (res.code == 1) {
          layer.msg(res.msg);
          var index = parent.layer.getFrameIndex(window.name);
          parent.layer.close(index);
          parent.$.pjax.reload('#main', { fragment: '#main' });
        }
        if (res.code == 0) {
          layer.msg(res.msg);
        }
      });

      return false;
    });
  });
</script>
</body>

</html>